package com.mcxx.modules.miniSalvation.order.service.write;

import com.mcxx.modules.miniSalvation.order.dao.write.InspectionOrderWriteDao;
import com.mcxx.modules.miniSalvation.order.entity.InspectionOrderEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InspectionOrderWriteService {

    @Autowired
    private InspectionOrderWriteDao inspectionOrderWriteDao;


    public int insert(InspectionOrderEntity entity) {
        return inspectionOrderWriteDao.insert(entity);
    }


    public int insertIgnoreNull(InspectionOrderEntity entity) {
        return inspectionOrderWriteDao.insertIgnoreNull(entity);
    }


    public int update(InspectionOrderEntity entity) {
        return inspectionOrderWriteDao.update(entity);
    }


    public int updateIgnoreNull(InspectionOrderEntity entity) {
        return inspectionOrderWriteDao.updateIgnoreNull(entity);
    }


    public int delete(InspectionOrderEntity entity) {
        return inspectionOrderWriteDao.delete(entity);
    }


    public void batchInsert(String batchId, List<String> orderIds) {
        inspectionOrderWriteDao.batchInsert(batchId, orderIds);
    }


    public void batchDelete(String batchId, List<String> ids) {
        inspectionOrderWriteDao.batchDelete(batchId, ids);
    }


    public void deleteByBatchId(String batchId) {
        inspectionOrderWriteDao.deleteByBatchId(batchId);
    }
}
